import request from '@/utils/request'

export function FriendShipList_API(status, nickname = '') {
    return request({
        url: `/friend/list?status=${status}&nickname=${nickname}`,
        method: 'get',
        headers: {
            'Authorization': 'Bearer ' + localStorage.getItem('token')
        }
    })
}

export function FriendShipAdd_API(tid) {
    return request({
        url: '/friend/add',
        method: 'post',
        headers: {
            'Authorization': 'Bearer ' + localStorage.getItem('token')
        },
        data: {
            tid
        }
    })
}

export function FriendShipUpdate_API(status, tid) {

    return request({
        url: '/friend/update',
        method: 'post',
        headers: {
            'Authorization': 'Bearer ' + localStorage.getItem('token')
        },
        data: {
            status,
            tid
        }
    })
}